// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(46,2) == 0;
	question = "special";
	text1 = "You find the remains of a small village, resting on the shore of the huge river that divides this region of Terrestia. This settlement was not abandoned recently. It looks like it was destroyed months ago.";
	text2 = "As you look around, you find that your hair is standing on end. The air is full of energy. Perhaps there is some unattended machinery nearby. Or rogue creations with a lot of raw power stored in their lumbering bodies.";
	action = SET_SDF 46 2 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(46,3) == 0;
	question = "special";
	text1 = "Unlike the ruins outside, this building remains intact and inhabited. A network of charged pylons crisscrosses this hall, protecting the privacy of the inhabitant. A pile of charred bones shows how serious these defenses are.";
	text2 = "You look for some clue to who lives here, but you see nothing but the machinery. You can't hear anything above the soft, crackling sound of the machinery.";
	action = SET_SDF 46 3 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(46,4) == 0;
	question = "special";
	text1 = "You find the ruined remains of a caravan. The shattered and burned wood of the wagons is covered with moss and starting to decay. It must have been destroyed months ago, about the time this town was sacked. Nothing of value remains.";
	action = SET_SDF 46 4 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This sign has been scorched into unreadability.";



begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Sage Olipha";
	text1 = "You meet the lone resident of this isolated workshop. He puts great faith in his defenses. He doesn't even notice when you enter. He is too absorbed in the spell he is casting.";
	text2 = "Then you look at his hands. You see the essence floating from them slowly coalescing into a small artila. As the creature begins to come to life, something goes wrong. Cracks appear in the little creature's skin. The man swears and waves a hand.";
	text3 = "As the artila dissolves, the man notices you. He looks at you, and the horrified look on his face immediately tells you something. He was Shaping, but he is no Shaper.";
	text4 = "He stammers, _What are you doing here, trespasser? I am Sage Olipha, and this is my home. I don't know what you thought you saw, but I assure you that it is best kept among us. Yes?_";
	text5 = "Sage Olipha watches you nervously. He is clearly anxious for you to leave so he can return to his illegal Shaping pursuits. You now understand why he was so careful to keep any visitors out of here.";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = -1;
	condition = gf(46,7) == 0;
	question = "I have permission to Shape. You don't. Your crime will have to be reported.";
	text1 = "Sage Olipha shakes his head. _No. If I let you leave here, my doom is assured. I can't let you go. I think that now it is time to put my skills into practice ..._";
	action = END_TALK;
	code =
		sf(46,7,3);
		inc_flag(100,0,2);
		set_attitude(23,10);
	break;

begintalknode 12;
	state = 10;
	nextstate = -1;
	condition = gf(46,7) == 0;
	question = "It is of no concern to me what you do in here. Your secret is safe.";
	text1 = "Sage Olipha looks dubious. _I am a fool to trust you. If that fool up in Fort Vengeance learned what I was doing ..._ He shakes his head.";
	text2 = "_But I must take the risk. I hope that you will not get needlessly involved in the affairs of others. And I hope that you leave soon._";
	code =
		sf(46,7,1);
	break;
	
begintalknode 13;
	state = 10;
	nextstate = -1;
	condition = gf(46,7) == 0;
	question = "My sympathies are not with the Shapers. I hope that you can master their powers.";
	text1 = "Sage Olipha is greatly relieved. _I am glad to hear it. If that fool up in Fort Vengeance learned what I was doing ..._ He shakes his head.";
	text2 = "_It is good to have like-minded company. I have been alone almost since the beginning of the rebellion, carrying on my studies in secret._";
	code =
		sf(46,7,2);
		inc_flag(100,0,-2);
	break;

begintalknode 14;
	state = 10;
	nextstate = 11;
	condition = gf(46,7) > 0;
	question = "What is this workshop for?";
	text1 = "He grimaces. _The pleasure of the Shapers. Guardian Genzlin, up in Fort Vengeance, he commandeered this place when the rebellion came west. It was where I did my work. Then I had to breed and assemble mines and pylons for him instead._";
	text2 = "_Fortunately, he leaves me alone as long as I meet my quotas for supplies. I get to keep my privacy. I value it greatly, as you have seen._";

begintalknode 15;
	state = 10;
	nextstate = 12;
	condition = gf(46,7) > 0;
	question = "How did you learn to Shape?";
	text1 = "He weighs whether he should say anything or not. Finally, a desire to share details about his years of solitary labor overwhelms his caution. _The Shapers pay me very well for my work here._";
	text2 = "_For centuries, they have controlled their secrets. However, in this time of rebellion, their grasp has grown weak. There are many tomes and textbooks floating around, for the person who knows who to bribe._";

begintalknode 16;
	state = 10;
	nextstate = -1;
	condition = gf(46,7) != 2 && gf(46,7) > 0;
	question = "Can you teach me some of what you have learned?";
	text1 = "Sage Olipha shakes his head. _You have already learned too much from seeing me. You may, for all I know, still support the Shapers._";
	text2 = "_Just leave me. I desire my privacy._ He waves you away.";
	action = END_TALK;
	
	begintalknode 17;
	state = 10;
	nextstate = -1;
	condition = gf(46,7) == 2;
	question = "Can you teach me some of what you have learned?";
	text1 = "You conclude your training.";	
	code = 
		begin_shop_mode("Sage Olipha",
		  "Sage Olipha tells you what he has learned of the Shaping arts. He knows a number of techniques, though he is not capable of using all of them.",
		  49,5,0);	
	break;

begintalknode 18;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "The Shapers just took over your workshop?";
	text1 = "_They are the Shapers. That is what they do. Understand that I am paid very well for my time and labor. But it still remains at their command._";

begintalknode 19;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "You can make pylons?";
	text1 = "He waves at the half-completed pylon on the nearby platform. _Someone has to. There aren't enough Shapers to make them from mere essence. I breed the creatures within, make the shells, and assemble the final product._";
	
begintalknode 20;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Do the kyshakks bother you?";
	text1 = "_Not at all. In fact, they do an excellent job of keeping intruders away. They avoid the soldiers who come down the hill to collect my goods. Suits me well._";

begintalknode 21;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "Why didn't you become a Shaper the normal way?";
	text1 = "_I tried. I was smart enough. However, I was not suitably mindlessly loyal to Shaper ideology. And that was the end of it._";
	text2 = "";

begintalknode 22;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "Would you pay me for Shaper documents?";
	text1 = "_Not at this point. I already have more books than I understand. Only when I have mastered them will I know what path I want to follow._";

begintalknode 23;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "Why don't you have any creations around to defend you?";
	text1 = "He laughs. _Because then, the moment troops from Fort Vengeance arrived and saw them, I would be killed._";

begintalknode 24;
	state = 10;
	nextstate = -1;
	condition = gf(48,3) == 1;
	question = "Guardian Genzlin has told me to kill you. (Attack.)";
	text1 = "_I knew I should have killed you before. Well, at least I finally have a chance to put my skills into use._";
	action = END_TALK;
	code =
		sf(46,7,3);
		set_attitude(23,10);
	break;

begintalknode 25;
	state = 10;
	nextstate = -1;
	condition = gf(46,7) > 0;
	question = "I'll be going now.";
	text1 = "_All right. And remember, it is best to keep quiet about matters that don't concern you._";
	action = END_TALK;

//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 32;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 33;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 34;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 35;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 36;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 37;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 38;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 39;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 40;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 41;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 42;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 43;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 44;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 59;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 60;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 61;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 62;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 63;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 64;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		